#ifdef GAMEENGINE_NAMESPACES
namespace GameEngine {
#endif


//! Default constructor
template <class C>
MapCell<C>::MapCell() : terrain_(TerrainDescriptor::InvalidTerrain), connectivity_(0) {}

//! Copy constructor
/*!
 @param rhs The map cell to copy
 */
template <class C>
MapCell<C>::MapCell(const MapCell& rhs) : terrain_(rhs.terrain_), connectivity_(rhs.connectivity_) {}

//! Destructor
template <class C>
MapCell<C>::~MapCell() {}

//! Assignment operator
/*!
 @param rhs The map cell to copy
 */
template <class C>
MapCell<C>& MapCell<C>::operator=(const MapCell& rhs) {
	if ( &rhs != this ) {
		terrain_ = rhs.terrain_;
		connectivity_ = rhs.connectivity_;
	}
	return *this;
}

//! Accessor to the type of terrain associated to the cell (read-write)
/*!
 @return A reference to the type of terrain associated to the cell
 */
template <class C>
TerrainDescriptor::TerrainType& MapCell<C>::terrain() {
	return terrain_;
}

//! Accessor to the type of terrain associated to the cell (read only)
/*!
 @return A constant reference to the type of terrain associated to the cell
 */
template <class C>
const TerrainDescriptor::TerrainType& MapCell<C>::terrain() const {
	return terrain_;
}

//! Accessor to the connectivity flag of the cell (read-write)
/*!
 @return A reference to the connectivity flag of the cell
 */
template <class C>
C& MapCell<C>::connectivity() {
	return connectivity_;
}

//! Accessor to the connectivity flag of the cell (read only)
/*!
 @return A constant reference to the connectivity flag of the cell
 */
template <class C>
const C& MapCell<C>::connectivity() const {
	return connectivity_;
}


#ifdef GAMEENGINE_NAMESPACES
} // namespace GameEngine
#endif
